
$(function() {
        if($.cookie("video")=="index"){
        }else{
    	var winHeight = 0;
	    if (window.innerHeight){
	        winHeight = window.innerHeight;
	    }else if ((document.body) && (document.body.clientHeight)){
	        winHeight = document.body.clientHeight;
	    }
	    $(".video").height(winHeight);

	    $(window).resize(function() {
	        var winHeight = 0;
	        if (window.innerHeight){
	            winHeight = window.innerHeight;
	        }else if ((document.body) && (document.body.clientHeight)){
	            winHeight = document.body.clientHeight;
	        }
	        $(".video").height(winHeight);
	    });
	    $(".video").css("display","block");	
	    //首屏触发事件
	    $(".video").on("click",function(){
	        $("body").css("overflow","auto");
	        $(".video").animate({top: -winHeight + 'px'}, 800);
	        setTimeout(function(){
	            $(".video").hide();
	        },800);
	    });

	    $('.video').mousewheel(function(event, delta, deltaX, deltaY) {
	        if(delta < 0){
	            $("body").css("overflow","auto");
	            $(".video").animate({top: -winHeight + 'px'}, 800);
	            setTimeout(function(){
	                $(".video").hide();
	            },800);
	            
	        }
	       $('html, body').animate({scrollTop:0}, '0');
	    });
            
            $.cookie("video","index");
        };

  
});
